package com.xiaomi.pojo;

import org.springframework.context.annotation.ComponentScan;

@ComponentScan
public class Cart {
	private int id;//用户id
	private int pid;//商品id
	private int num;//数量
	private double money;//价格
	private Goods goods;

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getPid() {
		return pid;
	}
	public void setPid(int pid) {
		this.pid = pid;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public double getMoney() {
		return money;
	}
	public void setMoney(double money) {
		this.money = money;
	}
	public Cart(int id, int pid, int num, double money) {
		super();
		this.id = id;
		this.pid = pid;
		this.num = num;
		this.money = money;
	}
	public Cart() {
		super();
	}

	@Override
	public String toString() {
		return "Cart{" +
				"id=" + id +
				", pid=" + pid +
				", num=" + num +
				", money=" + money +
				", goods=" + goods +
				'}';
	}
}
